package com.jdd.dao.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 设备指令回复表
 * </p>
 *
 * @author zly
 * @since 2022-03-24
 */
@Data
@ApiModel(value = "TDeviceCmdResponse对象", description = "设备指令回复表")
public class TDeviceCmdResponse implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id")
    private String id;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "批次号")
    private String cmdBatchId;

    @ApiModelProperty(value = "执行结果")
    private Integer responseResult;

    @ApiModelProperty(value = "回复指令")
    private String responseCmd;

    @ApiModelProperty(value = "指令id")
    private String cmdId;

    @ApiModelProperty(value = "设备sn号")
    private String deviceNumber;

    @ApiModelProperty(value = "回复信息")
    private String responseMessage;

    @ApiModelProperty(value = "项目id")
    private String projectId;

    @ApiModelProperty(value = "项目名称")
    @TableField(exist = false)
    private String projectName;

    @TableField(exist = false)
    private Integer optionType;

    @TableField(exist = false)
    private String optionType_dictText;

   @TableField(exist = false)
    private String userName;

    @TableField(exist = false)
    private Integer optionStatus;

    @TableField(exist = false)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date opTime_begin;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date opTime_end;
}
